<?php
mysql_connect("localhost","tftpot_ryan","Kl14ein86");
mysql_select_db("tftpot_tftp");
$parameters = json_decode(file_get_contents("php://input"));
if($parameters->{'rating'} == 1){
	$q=mysql_query("update tftpot_tftp.Thoughts set leaveIt=leaveIt+1 where thoughtNumber =".$parameters->{'thoughtNumber'} );
}
else{
	$q=mysql_query("update tftp.Thoughts set flushIt=flushIt+1 where thoughtNumber =".$parameters->{'thoughtNumber'} );
}
print($q);
mysql_close();
?>